<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../css/style.css" />
		<script src="../js/head_public.js"></script>
		<style>
			.yirenzheng{background:#ff7e00;border-radius: 0.5rem;border: none!important;color: #fff!important;margin-top: 0.8rem;}
		    .gengxin{font-size: 0.3rem;color: #666;margin-top: 0.8rem;display: inline-block;margin-left: 0.5rem;}
		</style>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav ding-bar">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">订单详情</h1>
		</header>
		
		<div class="mui-content">
			<div class="order-info-container">
				<h1 id="ding-status">
		    		
		    	</h1>
		    	<div class="order-info-container-div">
		    		<p><span>收货人：<b id="shr"></b></span><span><b id="shr-phone"></b></span></p>
		    		<p><span>收获地址：</span><span><b id="adress">甘肃省兰州市西固区西固中路 第六佳园</b></span></p>
		    	</div>
			</div>
			<div class="kong"></div>
	    	<div class="ddxq-container">
	    		<h1 class="chaoshi" id="store_name">
	    			鑫辉超市
	    		</h1>
	    		<ul class="ddxq-container-ul" id="good-list">
	    			<!--<li >-->
	    				
	    					<!--<div>
		    					<div style="width: 25%;">
			    					<img src="../images/goods.png"/>
			    				</div>
			    				<div style="width: 50%;">
			    					<h2 class="shp-title">
			    						皮质沙发皮质沙发皮质沙发 皮质沙发皮质沙发皮质沙...
			    					</h2>
			    					<p class="only-line" style="margin: 0;">绿色+单人沙发</p>
			    				</div>
			    				<div class="shp-jg" style="width: 25%;">
			    					<h3>￥500.00</h3>
			    					<span>x1</span>
			    					<button>确认收获</button>
			    				</div>
		    				</div>-->
	    			
	    				
	    					
	    				
	    			<!--</li>-->
	    		</ul>
	    	</div>
	    	<div class="kong"></div>
    		<div class="psfs">
    			<p>配送方式</p>
    			<ul>
    				<li>免运费</li>
    				<li>快递</li>
    			</ul>
    		</div>
    		
    		<ul class="ddxq-fs-ul">
    			<!--<li><span>商品金额</span><span class="heji"></span></li>-->
    			<li><span>付款方式</span><span id="fangshi"></span></li>
    		</ul>
    		<div class="spxj">
				商品合计：<span class="heji">￥500.00</span>
			</div>
		</div>
		<script src="../js/mui.min.js"></script>
		<script src="../js/jquery-1.8.0.min.js"></script>
		<script src="../js/common.js"></script>
		<script src="../js/session.js"></script>
		<script>
			var userid=getCookie("userid")
			if(userid==""||userid==null){
				alert("您还没有登录，请先登录")
				location.href="../public/login.html"
			}else{
				var order_id=getQueryString("id");
				var params={};
				params.member_id=userid;
				params.id=order_id;
				
				$.post(net+"/public/index.php?s=api/memberorder/show_order",params,function(res){
					if(res.code=="200"){
						var goolist="";
						var heji=0;
						if(res.result.goods_list!=null&&res.result.goods_list.length!=0){
							$.each(res.result.goods_list, function(index,val) {
								heji+=parseFloat(this.goods_pay_price);
								var xiaoji=0;
								var xiaoji_str="";
								var price="";
								if(res.result.payment_code=="point"){
									price = '<h3>'+this.goods_point +'积分</h3>'
									xiaoji = parseInt(this.goods_point)*this.goods_num;
									xiaoji_str = '<div class="spxj">商品小计：<span>'+xiaoji+'积分</span></div>'
									$(".heji").html(parseInt(res.result.order_point)+'积分')
								}else{
									$(".heji").html("￥"+res.result.order_amount)
									price='<h3>￥'+this.goods_price +'</h3>'
								}
								var src=net+"public/uploads/home/store/goods/"+this.store_id+"/"+this.goods_image;
								goolist+='<li><div><div style="width: 25%;"><img src="'+src+'"/></div><div style="width: 50%;">'
								        +'<h2 class="shp-title">'+this.goods_name+'</h2></div>'
		    					        +'<div class="shp-jg" style="width: 25%;">'+price+'<span>x'+this.goods_num+'</span></div></div>'			    					
							            +xiaoji_str+'</li>'
							});
						}
					   $("#ding-status").html(res.result.state_desc)	
					   $("#store_name").html(res.result.store_name)	
					   $("#shr-phone").html(res.result.reciver_info.address_mob_phone)	
					   $("#adress").html(res.result.reciver_info.address)	
					   $("#shr").html(res.result.reciver_info.address_realname)	
					   $("#good-list").html(goolist)					 
					   $("#fangshi").html(res.result.payment_name)					   
					}
				})
			}
	</script>
	</body>

</html>